package com.atguigu.jxc.service.impl;

import com.atguigu.jxc.dao.UnitDao;
import com.atguigu.jxc.entity.Unit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author: Gavin
 * @Date: 9/11/2023 7:02 PM
 */
@Service
public class UnitService {
    @Autowired
    UnitDao unitDao;
    public Map<String, Object> queryAllunits() {
        List<Unit> units = unitDao.queryAllunits();
        Map<String,Object> map = new HashMap<>();
        map.put("rows",units);
        return map;
    }
}
